<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Dom示例</title>
</head>
<body>
    <div id="box1" class="box">
        dom的示例
    </div>
    <div id="box" class="box">
        dom的示例
    </div>
    <div class="box">
        dom的示例
    </div>
    <form name="Form1"></form>
    <form name="Form2"></form>
    <form></form>
</body>
<script>
    var get_id_div = document.getElementById('box1');
    console.log(get_id_div);
    console.log(typeof(get_id_div));
    console.log("--------------------");


    var get_div = document.getElementsByTagName('div');
    console.log(get_div);
    console.log(typeof(get_div));

    var get_css_div = document.querySelectorAll('.box');
    console.log(get_css_div);
    console.log(typeof(get_css_div));

    document.write(document.forms.length);
</script>
</html>